/*
 * Copyright 2009-2015 by WWW.KNET.CN  All rights reserved.
 */

package cn.knet.sp.ncrm.modules.call.reportin.service;

import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

import cn.knet.sp.ncrm.common.persistence.Page;
import cn.knet.sp.ncrm.common.service.CrudService;
import cn.knet.sp.ncrm.modules.call.reportin.dao.CallReportInDao;
import cn.knet.sp.ncrm.modules.call.reportin.entity.CallReportIn;
import cn.knet.sp.ncrm.modules.call.reportin.entity.CallReportInQuery;

/**
 * 呼入统计
 * @author zhangbin
 * @version 2015 -07-02
 */
@Service
@Transactional(readOnly = true)
public class CallReportInService extends CrudService<CallReportInDao, CallReportIn> {

	public CallReportIn get(String id) {
		return super.get(id);
	}
	
	public List<CallReportIn> findList(CallReportIn callReportIn) {
		return super.findList(callReportIn);
	}
	
	public Page<CallReportIn> findPage(Page<CallReportIn> page, CallReportIn callReportIn) {
		return super.findPage(page, callReportIn);
	}


	/**
	 * 统计查询 按照时间 统计人员呼入详情
	 * @author zhangbin
	 * @date 2015 /07/06 15:15:16
	 * @param query 分页条件
	 * @param callReportInQuery 查询参数
	 * @return the page
	 */
	public Page<CallReportIn> findStatPage(Page<CallReportIn> query, CallReportInQuery callReportInQuery) {
		callReportInQuery.setPage(query);
		query.setList(dao.findStatPage(callReportInQuery));
		return query;
	}
	
	@Transactional(readOnly = false)
	public void save(CallReportIn callReportIn) {
		super.save(callReportIn);
	}
	
	@Transactional(readOnly = false)
	public void delete(CallReportIn callReportIn) {
		super.delete(callReportIn);
	}

}